//网页版微博广告的
function clearAd(){
    try{
        let add = $("#v6_pl_content_homefeed  div")
        let adc = add[0].children;
        let ads = adc[adc.length-1].children;

        for(let i=0;i<ads.length;i++){

            let cc = ads[i].getAttribute("feedtype");

            if( cc !=null && cc !=undefined && cc=="ad"){
                ads[i].style.display="none";
                console.log("去了广告！");
               // ads[i].style.backgroundColor="red";

            }

        }

    }catch (e) {
    }
}


var scrollFunc=function(e){
    try{
        $("div .PCD_mplayer.clearfix")[0].remove();
    }catch (e) {}

    try{
        $("#Pl_Core_ThirdHtmlData__6").remove();
        $("#Pl_Core_ThirdHtmlData__5").remove();
    }catch (e) {}

    e=e || window.event;

    if(e.wheelDelta){//IE/Opera/Chrome
        clearAd();
    //    console.log("a")
    }else if(e.detail){//Firefox
        clearAd();
    }
}

$(document).ready(function(){


    /*注册事件*/
    if(document.addEventListener){
        document.addEventListener('DOMMouseScroll',scrollFunc,false);
    }//W3C
    window.onmousewheel=document.onmousewheel=scrollFunc;//IE/Opera/Chrome



});



